home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / util-linux.preinst < prev    next >
Text File  |  2009-10-22  |  2KB  |  50 lines

  1. #! /bin/sh
  2.  
  3. set -e
  4.  
  5. if [ "$1" = install ] || [ "$1" = upgrade ]; then
  6.     if [ -e "/etc/udev/rules.d/85-hwclock.rules" ]; then
  7.         if [ "`md5sum \"/etc/udev/rules.d/85-hwclock.rules\" | sed -e \"s/ .*//\"`" = \
  8.              "`dpkg-query -W -f='${Conffiles}' util-linux | sed -n -e \"\\\\' /etc/udev/rules.d/85-hwclock.rules's/.* //p\"`" ]
  9.         then
  10.             rm -f "/etc/udev/rules.d/85-hwclock.rules"
  11.         fi
  12.     fi
  13.  
  14.     if [ -e "/etc/init.d/hwclock.sh" ]; then
  15.         if [ "`md5sum \"/etc/init.d/hwclock.sh\" | sed -e \"s/ .*//\"`" = \
  16.              "`dpkg-query -W -f='${Conffiles}' util-linux | sed -n -e \"\\\\' /etc/init.d/hwclock.sh's/.* //p\"`" ]
  17.         then
  18.             rm -f "/etc/init.d/hwclock.sh"
  19.         else
  20.             mv "/etc/init.d/hwclock.sh" "/etc/init.d/hwclock.sh.dpkg-obsolete"
  21.         fi
  22.     fi
  23.  
  24.     if [ -e "/etc/init.d/hwclockfirst.sh" ]; then
  25.         if [ "`md5sum \"/etc/init.d/hwclockfirst.sh\" | sed -e \"s/ .*//\"`" = \
  26.              "`dpkg-query -W -f='${Conffiles}' util-linux | sed -n -e \"\\\\' /etc/init.d/hwclockfirst.sh's/.* //p\"`" ]
  27.         then
  28.             rm -f "/etc/init.d/hwclockfirst.sh"
  29.         else
  30.             mv "/etc/init.d/hwclockfirst.sh" "/etc/init.d/hwclockfirst.sh.dpkg-obsolete"
  31.         fi
  32.     fi
  33. fi
  34.  
  35. # Automatically added by dh_installinit
  36. if [ "$1" = install ] || [ "$1" = upgrade ]; then
  37.     if [ -e "/etc/init.d/hwclock" ] && [ ! -L "/etc/init.d/hwclock" ]; then
  38.         if [ "`md5sum \"/etc/init.d/hwclock\" | sed -e \"s/ .*//\"`" != \
  39.              "`dpkg-query -W -f='${Conffiles}' util-linux | sed -n -e \"\\\\' /etc/init.d/hwclock '{s/ obsolete$//;s/.* //p}\"`" ]
  40.         then
  41.             echo "Obsolete conffile /etc/init.d/hwclock has been modified by you, renaming to .dpkg-bak"
  42.             mv -f "/etc/init.d/hwclock" "/etc/init.d/hwclock.dpkg-bak"
  43.         else
  44.             rm -f "/etc/init.d/hwclock"
  45.         fi
  46.     fi
  47. fi
  48. # End automatically added section
  49.  
  50.